<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>

<!--  JQuery  -->
<script type="text/javascript" src="../jquery/jquery-1.7.2.min.js"></script>
<script type="text/javascript"
	src="../jquery/jquery-ui-1.8.20.custom.min.js"></script>
<link type="text/css"
	href="../jquery/smoothness/jquery-ui-1.10.1.custom.css"
	rel="stylesheet" />
<link type="text/css"
	href="../jquery/smoothness/jquery-ui-1.10.1.custom.min.css"
	rel="stylesheet" />


<!-- Bootstrap -->
<link href="../twbootstrap/css/bootstrap.min.css" rel="stylesheet"
	media="screen">
<link href="../twbootstrap/css/bootstrap-responsive.min.css"
	rel="stylesheet" media="screen">
<script src="../twbootstrap/js/bootstrap.min.js"></script>
<script src="../twbootstrap/js/bootstrap-dropdown.js"></script>




<!-- js Tree View -->
<script type="text/javascript" src="../jstree/_lib/jquery.js"></script>
<script type="text/javascript" src="../jstree/_lib/jquery.cookie.js"></script>
<script type="text/javascript" src="../jstree/_lib/jquery.hotkeys.js"></script>
<script type="text/javascript" src="../jstree/jquery.jstree.js"></script>


<script type="text/javascript">
	$(function() {

		$("#jstree").jstree({
			json_data : {
				ajax : {
					url : "../GetTreeData",
					type : "POST",
					dataType : "json",
					contentType : "application/json charset=utf-8",
					success : function(data) {

					}
				}
			},
			"themes" : {
				"theme" : "mytree",
				"dots" : false,
				"icons" : true
			// "url": "/css/jstree/themes/default/style.css"
			},

			"plugins" : [ "themes", "json_data", "ui" ]

		}).bind("select_node.jstree", function(e, data) {
			//alert(data.rslt.obj.data("id"));
			//var src= viewarticle.jsp?id=data.rslt.obj.data("id");
			$("#myframe").attr("src", "viewarticle.jsp");

		});


	});
</script>
</head>

<body>



	<form id="myForm" action="search.jsp" method="get"
		onsubmit="mySubmit()">


		<input type="hidden" id="searchstr" name='searchstr' value='' />


		<script>
			function mySubmit() {
				// alert("Data: "+ $("#searchparam").val());
				document.getElementById('searchstr').value = $("#searchparam")
						.val();
				document.getElementById("myForm").submit();
			}
		</script>



		<div class="navbar navbar-static-top">
			<div class="navbar-inner">
				<a class="brand" href="../wiki/home.jsp">Issue Tracker</a>
				<ul class="nav">
					<li class="divider-vertical"></li>
					<li id="addissue"><a href="../wiki/addIssue.jsp">Add Issue</a></li>
					<li class="divider-vertical"></li>
					<li id="allissue"><a href="../wiki/allIssues.jsp">Issues</a></li>
					<li class="divider-vertical"></li>
					<li class="span2"></li>
					<div class="form-search nav pull-right">
						<li class="input-append" style="margin-top: 5px;"><input
							id="searchparam" type="text" class="span4 search-query">
							<button type="submit" class="btn">Search</button></li>
					</div>

				</ul>

				<ul class="nav pull-right">
					<li class="divider-vertical"></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown">Admin <b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="settings.jsp">Modules</a></li>
							<li><a href="userroles.jsp">Permissions</a></li>
							<li><a href="reports.jsp">Reports</a></li>
						</ul></li>
					<li class="divider-vertical"></li>
					<li class="dropdown"><a href="#" class="dropdown-toggle"
						data-toggle="dropdown">Welcome <%=(String) session.getAttribute("firstname")%>
							<b class="caret"></b></a>
						<ul class="dropdown-menu">
							<li><a href="SendFeedback.jsp">Send Feedback</a></li>
							<li><a href="Logout.jsp">Logout</a></li>
						</ul></li>
				</ul>
			</div>
		</div>
	</form>

	<div class="span2">
		<div
			style="font-size: 16px; color: #787878; padding-left: 25px; padding-bottom: 5px; padding-top: 5px;">Issue
			List</div>
		<div id="jstree"></div>

	</div>
	

</body>

</html>